package com.example.controller;

import com.example.entity.check.SelfCheck;
import com.example.service.SelfCheckService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * Created by simon on 2018/5/30.
 */
@RestController
@RequestMapping(value = "api/selfCheck/")
public class SelfCheckController {

    @Autowired
    private SelfCheckService selfCheckService;

    @ApiOperation(value = "新增自检",notes = "新增自检")
    @RequestMapping(value="add",method = RequestMethod.POST)
    Map<String,Object> add(@RequestBody SelfCheck selfCheck){

        return selfCheckService.add(selfCheck);
    }

    @ApiOperation(value = "查询自检",notes = "查询自检")
    @RequestMapping(value="queryList",method = RequestMethod.POST)
    Map<String,Object> queryList(@RequestBody SelfCheck selfCheck){

        return selfCheckService.queryList(selfCheck);
    }

    @ApiOperation(value = "查询自检详情",notes = "查询自检详情")
    @RequestMapping(value="queryById/{id}",method = RequestMethod.POST)
    Map<String,Object> queryById(@PathVariable String id){
        return selfCheckService.queryById(id);
    }

   /* @ApiOperation(value = "导出年检报告",notes = "导出年检报告")
    @RequestMapping(value="export/{id}",method = RequestMethod.POST)
    Map<String,Object> exportInspectReport(@RequestBody SelfCheck selfCheck){
        return selfCheckService.exportInspectReport(selfCheck);
    }*/


}
